<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/25 0025
  Time: 10:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>实时显示公告信息</title>
    <!-- <link href="AjaxRequest.js" type="text/javascript"></link> -->
</head>
<body>

<div id="show" style="border:1px solid red; width: 300px;height: 200px;background-color: cyan;"></div>


	<%--<script language="JavaScript" src="AjaxRequest.js"></script>--%>
   <script>
       console.log("hhh");

       // 错误处理方法
       function onerror() {
           alert("您的操作有误!");
       }
       //实例化Ajax对象方法
       function getInfo() {
           var loader=new net.AjaxRequest("SQLJoint.jsp?nocache="+new Date().getTime(),deal_getInfo,onerror,"GET");
       }

       // 回调函数
       function deal_getInfo() {
           document.getElementById("show").innerHTML=this.req.responseText;
       }

       window.onload=function(){
           console.log("页面装载完毕!");
           getInfo();
           window.setInterval("getInfo()",600000);
           console.log("getInfo方法执行完毕!");
       }
   </script>

</body>
</html>
